From ddbc65a0a28e0e8ae7b4284f8014acbfbd1378cb Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Fri, 19 May 2006 14:54:08 +0000 Subject: [PATCH] Tweak table formats --- xmldoc/chapters/styles.xml | 224 +++++++++++++--------------- xmldoc/formats/options/an1-road.xml | 91 +++++------ 2 files changed, 149 insertions(+), 166 deletions(-) diff --git a/xmldoc/chapters/styles.xml b/xmldoc/chapters/styles.xml index 8961f6668..7ec225047 100644 --- a/xmldoc/chapters/styles.xml +++ b/xmldoc/chapters/styles.xml @@ -1,5 +1,8 @@ GPSBabel XCSV Style Files + +
+Introduction The format of an XCSV style file is quite simple and designed to be easily implemented by non-programmers to handle "one-off" babel-ization of various @@ -15,6 +18,8 @@ file is laid out itself. The format is: Where <whitespace> is a space, tab, spaces, tabs, etc... There should be nothing before the directive. (i.e. not " DIRECTIVE VALUE") +
+
Internal Constants @@ -22,32 +27,55 @@ A few internal constants are defined in the XCSV parser to make the style file simpler. They may or may not be used and are optional in most cases. Note that only certain style file directives map these constants. - -Internal Constants for XCSV - - - -STYLE CONSTANT MAPS TO CHAR(s) - - -COMMA , -COMMASPACE ,<space> -SINGLEQUOTE ' -DOUBLEQUOTE " -COLON : -SEMICOLON ; -NEWLINE \n -CR \r -CRNEWLINE \r\n -TAB \t -SPACE <space> -HASH # -PIPE | -WHITESPACE *** SEE WHITESPACE NOTES BELOW *** - - -
- + + + +Style Constant +Maps to Char(s) + +COMMA, + + +COMMASPACE,<space> + + +SINGLEQUOTE' + + +DOUBLEQUOTE" + + +COLON: + + +SEMICOLON; + + +NEWLINE\n + + +CR\r + + +CRNEWLINE\r\n + + +TAB\t + + +SPACE<space> + + +HASH# + + +PIPE| + + +WHITESPACEsee below + + +
WHITESPACE @@ -58,14 +86,12 @@ writing data, WHITESPACE is always a single SPACE. For example, the following line: - -SOME_NAME 30.1208 -91.1365 SOME OTHER NAME +SOME_NAME 30.1208 -91.1365 SOME OTHER NAME Parses into the following data fields: - -SOME_NAME,30.1208,-91.1365,SOME,OTHER,NAME +SOME_NAME,30.1208,-91.1365,SOME,OTHER,NAME
@@ -74,8 +100,7 @@ SOME_NAME,30.1208,-91.1365,SOME,OTHER,NAME Anything after a hash (#) on a line is not parsed. For example: - -#THIS ENTIRE LINE IS A COMMENT. +#THIS ENTIRE LINE IS A COMMENT. #FIELD LAT_DECIMAL, "", "%f" THIS ENTIRE LINE IS A COMMENT FIELD LAT_DECIMAL, "", "%f" # ONLY THIS SENTENCE IS A COMMENT. @@ -108,8 +133,7 @@ this file. Describes the character set used by this format. The value given must be one listed by 'gpsbabel -l'. example: - - ENCODING UTF-8 # Use UTF-8 for input and output. + ENCODING UTF-8 # Use UTF-8 for input and output.
@@ -129,8 +153,7 @@ processing functions of GPSbabel. example: - - SHORTLEN 16 # shortnames will be at most 16 characters long. + SHORTLEN 16 # shortnames will be at most 16 characters long. @@ -143,8 +166,7 @@ processing functions of GPSbabel. example: - - SHORTWHITE 0 # Do not allow whitespace in shortname. + SHORTWHITE 0 # Do not allow whitespace in shortname. SHORTWHITE 1 # Allow whitespace in shortname. @@ -167,8 +189,7 @@ The first few directives define the layout the physical file itself: examples: - - FIELD_DELIMITER COMMA + FIELD_DELIMITER COMMA FIELD_DELIMITER ~ @@ -187,8 +208,7 @@ The first few directives define the layout the physical file itself: examples: - - RECORD_DELIMITER NEWLINE + RECORD_DELIMITER NEWLINE RECORD_DELIMITER | @@ -207,8 +227,7 @@ The first few directives define the layout the physical file itself: examples: - - BADCHARS COMMA + BADCHARS COMMA BADCHARS ~| @@ -228,8 +247,7 @@ The first few directives define the layout the physical file itself: examples: - - PROLOGUE OziExplorer Waypoint File Version 1.1 + PROLOGUE OziExplorer Waypoint File Version 1.1 PROLOGUE WGS 84 PROLOGUE Symbol,Name,Latitude,Longitude @@ -299,8 +317,7 @@ The fields used by the XCSV parser are as follows: examples: - - IFIELD IGNORE,"","%14.14s" # (writes a 14 character blank field) + IFIELD IGNORE,"","%14.14s" # (writes a 14 character blank field) IFIELD IGNORE,"","%s" # (writes a blank field on output) @@ -315,8 +332,7 @@ examples: examples: - - IFIELD CONSTANT,"FFFFFF","%s" # (writes "FFFFFF" in the field) + IFIELD CONSTANT,"FFFFFF","%s" # (writes "FFFFFF" in the field) IFIELD CONSTANT,"01/01/70","%s" # (a constant date field) @@ -334,8 +350,7 @@ examples: examples: - - IFIELD INDEX,"0","%04d" # (Starts counting at zero) + IFIELD INDEX,"0","%04d" # (Starts counting at zero) IFIELD INDEX,"","%04d" # (Starts counting at zero) IFIELD INDEX,"1","%04d" # (Starts counting at one) @@ -351,8 +366,7 @@ examples: example: - - IFIELD SHORTNAME,"","%s" # (write shortname in the output file) + IFIELD SHORTNAME,"","%s" # (write shortname in the output file) @@ -366,8 +380,7 @@ example: examples: - - IFIELD DESCRIPTION,"","%s" # (write description in the output file) + IFIELD DESCRIPTION,"","%s" # (write description in the output file) @@ -389,8 +402,7 @@ examples: example: - - IFIELD URL,"","%s" # (writes the URL in the output file) + IFIELD URL,"","%s" # (writes the URL in the output file) @@ -404,8 +416,7 @@ example: example: - - IFIELD URL_LINK_TEXT,"","%s" # (writes link text in the output file) + IFIELD URL_LINK_TEXT,"","%s" # (writes link text in the output file) @@ -419,8 +430,7 @@ example: example: - - IFIELD ICON_DESCR,"","%s" # (writes link text in the output file) + IFIELD ICON_DESCR,"","%s" # (writes link text in the output file) @@ -434,8 +444,7 @@ example: example: - - IFIELD LAT_DECIMAL,"","%f" + IFIELD LAT_DECIMAL,"","%f" @@ -457,8 +466,7 @@ example: example: - - IFIELD LAT_INT32DEG,"","%ld" + IFIELD LAT_INT32DEG,"","%ld" @@ -483,8 +491,7 @@ example: examples: - - IFIELD LAT_DECIMALDIR,"","%f %c" # (writes 31.333 N) + IFIELD LAT_DECIMALDIR,"","%f %c" # (writes 31.333 N) IFIELD LAT_DIRDECIMAL,"","%c %f" # (writes N 31.333) @@ -518,8 +525,7 @@ examples: examples: - - IFIELD LAT_HUMAN_READABLE,"","%c %d %f" # (writes N 31 40.000) + IFIELD LAT_HUMAN_READABLE,"","%c %d %f" # (writes N 31 40.000) IFIELD LAT_HUMAN_READABLE,"","%d deg %f min %c" # (writes "31 deg 40.000 min N") # Note that this string will confuse the reading routine due @@ -547,8 +553,7 @@ examples: example: - - IFIELD LATLON_HUMAN_READABLE,"","%c %d %f" + IFIELD LATLON_HUMAN_READABLE,"","%c %d %f" # (writes "N 31 40.126 W 85 09.62" as a single field) @@ -562,8 +567,7 @@ example: example: - - IFIELD LAT_NMEA, "%f", "%08.3f" # (writes 3558.322) + IFIELD LAT_NMEA, "%f", "%08.3f" # (writes 3558.322) @@ -576,8 +580,7 @@ example: example: - - IFIELD LON_NMEA, "%f", "%010.3f" # (writes -08708.082) + IFIELD LON_NMEA, "%f", "%010.3f" # (writes -08708.082) @@ -591,8 +594,7 @@ example: example: - - IFIELD ALT_FEET,"","%.0f" + IFIELD ALT_FEET,"","%.0f" @@ -613,8 +615,7 @@ example: example: - - IFIELD HEART_RATE,"","%d" + IFIELD HEART_RATE,"","%d" @@ -628,8 +629,7 @@ example: example: - - IFIELD EXCEL_TIME,"","%11.5f" + IFIELD EXCEL_TIME,"","%11.5f" @@ -644,8 +644,7 @@ example: example: - - IFIELD TIMET_TIME,"","%ld" + IFIELD TIMET_TIME,"","%ld" @@ -660,8 +659,7 @@ example: example: - - IFIELD YYYYMMDD_TIME,"","%ld" + IFIELD YYYYMMDD_TIME,"","%ld" @@ -674,8 +672,7 @@ example: example: - - IFIELD GMT_TIME,"","%m/%d/%Y %I:%M:%D %p" + IFIELD GMT_TIME,"","%m/%d/%Y %I:%M:%D %p" Search the web for 'strptime man page' for details strptime, but one @@ -694,8 +691,7 @@ example: example: - - IFIELD LOCAL_TIME,"","%y-%m-%d" + IFIELD LOCAL_TIME,"","%y-%m-%d" @@ -709,8 +705,7 @@ example: example: - - IFIELD HMSG_TIME,"","%d:%d:%d %s" + IFIELD HMSG_TIME,"","%d:%d:%d %s" @@ -724,8 +719,7 @@ example: example: - - IFIELD HMSL_TIME,"","%dh%dm" + IFIELD HMSL_TIME,"","%dh%dm" @@ -742,8 +736,7 @@ example: example: - - IFIELD ISO_TIME,"","%s" + IFIELD ISO_TIME,"","%s" @@ -757,8 +750,7 @@ example: example: - - IFIELD GEOCACHE_DIFF,"","%3.1f" + IFIELD GEOCACHE_DIFF,"","%3.1f" @@ -772,8 +764,7 @@ example: example: - - IFIELD GEOCACHE_TERR,"","%3.1f" + IFIELD GEOCACHE_TERR,"","%3.1f" @@ -787,8 +778,7 @@ example: example: - - GEOCACHE_CONTAINER,"","%s" + GEOCACHE_CONTAINER,"","%s" @@ -802,8 +792,7 @@ example: example: - - GEOCACHE_TYPE,"","%s" + GEOCACHE_TYPE,"","%s" @@ -816,8 +805,7 @@ example: example: - - GEOCACHE_PLACER,"","%s" + GEOCACHE_PLACER,"","%s" @@ -830,8 +818,7 @@ example: example: - - GEOCACHE_LAST_FOUND,"","%ld" + GEOCACHE_LAST_FOUND,"","%ld" @@ -844,8 +831,7 @@ example: example: - - GEOCACHE_HINT,"","%s" + GEOCACHE_HINT,"","%s" @@ -867,8 +853,7 @@ example: example: - - PATH_DISTANCE_MILES,"","%f" + PATH_DISTANCE_MILES,"","%f" @@ -891,8 +876,7 @@ example: example: - - PATH_SPEED,"","%f" + PATH_SPEED,"","%f" @@ -906,8 +890,7 @@ example: example: - - PATH_COURSE,"","%f" + PATH_COURSE,"","%f" @@ -920,8 +903,7 @@ example: example: - - GPS_HDOP,"","%f" + GPS_HDOP,"","%f" @@ -934,8 +916,7 @@ example: example: - - GPS_SAT,"","%d" + GPS_SAT,"","%d" @@ -948,8 +929,7 @@ filter). Needs string conversion. example: - - GPS_FIX,"","%s" + GPS_FIX,"","%s" diff --git a/xmldoc/formats/options/an1-road.xml b/xmldoc/formats/options/an1-road.xml index 8cf7a3f81..f71a23181 100644 --- a/xmldoc/formats/options/an1-road.xml +++ b/xmldoc/formats/options/an1-road.xml @@ -3,50 +3,53 @@ If you are creating a road layer, you may use the "road" option, which allows you to change the types of roads based on their names. You can change multiple roads at the same time. Currently supported types are - - - - limited - Limited-access freeways - - - toll - Limited-access toll highways - - - ramp - Access ramps for limited-access highways - - - us - National highways (e.g. US routes) - - - primary - Primary State/Provincial routes - - - state - State/Provincial routes - - - major - Major Connectors - - - ferry - Ferry Routes - - - local - Local Roads - - - editable - User-drawn Roads - - - + + + +Type +Meaning + + limited + Limited-access freeways + + + toll + Limited-access toll highways + + + ramp + Access ramps for limited-access highways + + + us + National highways (e.g. US routes) + + + primary + Primary State/Provincial routes + + + state + State/Provincial routes + + + major + Major Connectors + + + ferry + Ferry Routes + + + local + Local Roads + + + editable + User-drawn Roads + + + GPSBabel defaults to creating editable roads. These are routed just like local roads, but may be edited with the drawing tools in Street Atlas. -- 2.30.2